package com.example.demo.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Map;

@Data
@TableName("sys_dict_item")
public class DictItem {

    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @TableField("TYPE_CODE")
    private String typeCode;

    @TableField("ITEM_KEY")
    private String itemKey;

    @TableField("ITEM_VALUE")
    private String itemValue;

    @TableField("SORT")
    private Integer sort;

    @TableField("EXTEND")
    private Map<String, Object> extend; // 扩展字段

    /**
     * 创建时间
     */
    @TableField(value="CREATED_TIME",fill = FieldFill.INSERT)
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime createdTime;
}